<template>
  <div>
    <el-drawer :title="$t('message.xianqing')" size="800px" :visible.sync="isShowModal">
      <el-form label-suffix="：" label-width="auto">
        <el-form-item :label="$t('message.jhmc')">
          <span>{{ detail.name }}</span>
        </el-form-item>
        <el-form-item :label="$t('message.jsdx')">
          <span>{{ detail.portraitName }}</span>
        </el-form-item>
        <el-form-item :label="$t('message.fbnr')">
          <template v-for="(item, i) in detail.grantObjList">
            <span :key="i">{{ item.name }}</span>
            <span v-if="i !== detail.grantObjList.length - 1" :key="i">，</span>
          </template>
        </el-form-item>
        <el-form-item :label="$t('message.dxtz')">
          <span>{{
            detail.smsSend == "1" ? $t('message.bfdxtz') : $t('message.fsdxtz')
          }}</span>
        </el-form-item>
        <el-form-item v-if="detail.smsSend == '0'" :label="$t('message.dxnr')">
          <span v-if="detail.smsInfo">{{ detail.smsInfo }}</span>
          <span v-if="detail.tempName">{{ $t('message.moban') }}{{ detail.tempName }}</span>
        </el-form-item>

        <div class="mb20">
          <span class="property-title">{{ $t('message.yxjh') }}</span>
        </div>
        <el-form-item :label="$t('message.sczxsj')">
          <span>{{ detail.firstTime }}</span>
        </el-form-item>
        <el-form-item :label="$t('message.zxpc')">
          <span>{{ $t('message.mei') }}{{ detail.interval }}{{ $t('message.tyxyc') }}</span>
        </el-form-item>
        <el-form-item :label="$t('message.zxcs')">
          <span>{{ $t('message.cxyx') }}{{ detail.allNum }}{{ $t('message.cihou') }}，{{ $t('message.tzyx') }}</span>
        </el-form-item>
        <el-form-item :label="$t('message.zxdx')">
          <span>{{
            detail.objType == "1" ? $t('message.mztcdxzhy') : $t('message.mztjdqbhy')
          }}</span>
        </el-form-item>
      </el-form>
    </el-drawer>
  </div>
</template>

<script>
import {
  marketingPlanDetail
} from '@/api'
export default {
  data() {
    return {
      detail: {},
      isShowModal: false
    }
  },
  methods: {
    getDetail(id) {
      marketingPlanDetail({ param: { id }}).then(res => {
        if (res.errorCode !== '000000') return
        this.detail = res.record
      })
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
